# Maintainer: Hugo Osvaldo Barrera <hugo@whynothugo.nl>
pkgname=dbus-waiter
pkgver=0.2.0
pkgrel=0
pkgdesc="Implement readiness notifications for dbus services"
url="https://git.sr.ht/~whynothugo/dbus-waiter"
# s390x: nix/libc crate
arch="all !s390x"
license="ISC"
makedepends="cargo cargo-auditable"
source="dbus-waiter-$pkgver.tar.gz::https://git.sr.ht/~whynothugo/dbus-waiter/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"
options="net" # fetch dependencies

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

check() {
	cargo test --frozen
}

package() {
	install -Dm 0755 target/release/$pkgname "$pkgdir/usr/bin/$pkgname"
}

sha512sums="
abb1ab4b09ac104ba28e0c1a05d19feae13308bd6ff356653100a834d496861dcc32b4ca0de51640df5ce467b6d9ec2b90e7094f5043b0db1ee71a74315124e9  dbus-waiter-0.2.0.tar.gz
"
